package com.mrdeer.merchant.convert;

import com.mrdeer.merchant.api.dto.MerchantDTO;
import com.mrdeer.merchant.api.entity.Merchant;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author ：xie jianchu
 * @date ：Created in 2020/9/10 0010 10:36
 */
@Mapper
public interface MerchantConvert {

    MerchantConvert INSTANCE = Mappers.getMapper(MerchantConvert.class);

    Merchant dto2Entity(MerchantDTO dto);

    List<MerchantDTO> entityList2DtoList(List<Merchant> merchants);

    List<Merchant> dtoList2EntityList(List<MerchantDTO> dtos);

    MerchantDTO entity2DTO(Merchant entity);
}
